<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      var date = new Date()
      console.log(date) //Mon Sep 05 2022 15:55:43 GMT+0800 (中国标准时间)

      // new Date 传参
      // 1 个参数 毫秒数
      var date1 = new Date(1000)
      console.log(date1) //Thu Jan 01 1970 08:00:01 GMT+0800
      // 2 个参数   3个参数
      var date2 = new Date(2023, 0, 3, 10, 10, 10)
      console.log(date2) //Tue Jan 03 2023 10:10:10 GMT+0800
    </script>
  </body>
</html>
